package top.frsf.rpc.annotations;

import top.frsf.rpc.enums.LoadBalanceEnum;

import javax.annotation.Resource;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * RPC 服务引用注解
 *
 * @author He Kuntao
 * @since 2025/7/8 9:43
 */
@Resource
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RpcReference {

    /**
     * 负载均衡策略 (默认轮询)
     *
     * @return 负载均衡策略
     */
    LoadBalanceEnum loadBalance() default LoadBalanceEnum.ROUND_ROBIN;
}
